home *** CD-ROM | disk | FTP | other *** search
/ CD/PC Actual 76 / DVD Actual 1 Marzo 2003.iso / Trial / TurboCAD 7.1 Pro / Data.Cab / F24743_Jpeg.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2000-11-10  |  3.1 KB  |  96 lines

  1. /******************************************************************/
  2. /*                                                                */
  3. /*                      TurboCAD for Windows                      */
  4. /*                   Copyright (c) 1993 - 1999                    */
  5. /*             International Microcomputer Software, Inc.         */
  6. /*                            (IMSI)                              */
  7. /*                      All rights reserved.                      */
  8. /*                                                                */
  9. /******************************************************************/
  10. // JPEG.cpp : Defines the initialization routines for the DLL.
  11. //
  12.  
  13. #include "stdafx.h"
  14. #include "JPEG.h"
  15.  
  16. #ifdef _DEBUG
  17. #define new DEBUG_NEW
  18. #undef THIS_FILE
  19. static char THIS_FILE[] = __FILE__;
  20. #endif
  21.  
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CJPEGApp
  24.  
  25. BEGIN_MESSAGE_MAP(CJPEGApp, CWinApp)
  26.     //{{AFX_MSG_MAP(CJPEGApp)
  27.         // NOTE - the ClassWizard will add and remove mapping macros here.
  28.         //    DO NOT EDIT what you see in these blocks of generated code!
  29.     //}}AFX_MSG_MAP
  30. END_MESSAGE_MAP()
  31.  
  32. /////////////////////////////////////////////////////////////////////////////
  33. // CJPEGApp construction
  34.  
  35. // DUAL_SUPPORT_START
  36.  
  37. // Note: if you make a custom filter by copying this file, make sure to replace the following
  38. //  GUID with a new GUID that matches the uuid statement in the library declaration in the 
  39. //  .ODL file.  This is the GUID that OLE will use to register and use the automation object's
  40. //  type library.
  41.  
  42. // {28696022-B7E6-11D0-9B3B-444553540000}
  43. static const GUID LIBID_JPEG = 
  44.     { 0x28696022L, 0xb7e6, 0x11d0, 0x9b, 0x3b, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0 };
  45. // DUAL_SUPPORT_END
  46.  
  47. CJPEGApp::CJPEGApp()
  48. {
  49. }
  50.  
  51. /////////////////////////////////////////////////////////////////////////////
  52. // The one and only CJPEGApp object
  53.  
  54. CJPEGApp theApp;
  55.  
  56. /////////////////////////////////////////////////////////////////////////////
  57. // CJPEGApp initialization
  58.  
  59. BOOL CJPEGApp::InitInstance()
  60. {
  61.     // Register all OLE server (factories) as running.  This enables the
  62.     //  OLE libraries to create objects from other applications.
  63.     COleObjectFactory::RegisterAll();
  64.  
  65.     // DUAL_SUPPORT_START
  66.     //    make sure the type library is registerd. Otherwise dual interface won't work!
  67.     //    note that we are embedding type library as a resource in this DLL.
  68.     AfxOleRegisterTypeLib(AfxGetInstanceHandle(), LIBID_JPEG);
  69.     // DUAL_SUPPORT_END
  70.  
  71.     return TRUE;
  72. }
  73.  
  74. /////////////////////////////////////////////////////////////////////////////
  75. // Special entry points required for inproc servers
  76.  
  77. STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
  78. {
  79.     AFX_MANAGE_STATE(AfxGetStaticModuleState());
  80.     return AfxDllGetClassObject(rclsid, riid, ppv);
  81. }
  82.  
  83. STDAPI DllCanUnloadNow(void)
  84. {
  85.     AFX_MANAGE_STATE(AfxGetStaticModuleState());
  86.     return AfxDllCanUnloadNow();
  87. }
  88.  
  89. // by exporting DllRegisterServer, you can use regsvr.exe
  90. STDAPI DllRegisterServer(void)
  91. {
  92.     AFX_MANAGE_STATE(AfxGetStaticModuleState());
  93.     COleObjectFactory::UpdateRegistryAll();
  94.     return S_OK;
  95. }
  96.